package com.teemor.blog.service;

import com.teemor.blog.bean.condition.TbArticleCondition;
import com.teemor.blog.bean.dto.input.article.AddArticleIDTo;
import com.teemor.blog.bean.entity.TbArticle;
import com.teemor.blog.bean.dto.input.article.QryArticlesIDTo;
import com.teemor.blog.bean.dto.output.article.QryArchivesODTo;
import com.teemor.blog.bean.dto.output.article.QryArticleODTo;
import com.teemor.blog.bean.dto.output.article.QryArticlesODTo;
import com.teemor.common.bean.base.PageBean;

import java.util.List;
import java.util.Map;

/**
 * @author: zhoulk
 * @Description: 原子服务
 * @date: 2019/11/26 14:50:14
 */
public interface IArticleService {
     /** 
   * @Function: com.teemor.blog.service.IArticleService.countArticle
   * @Description: 数量查询接口
   * @param: condition
   * @return: int
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    int countArticle(TbArticleCondition condition);

     /** 
   * @Function: com.teemor.blog.service.IArticleService.qryArticles
   * @Description: 列表查询接口
   * @param: condition
   * @return: List<TbArticle>
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    PageBean<QryArticlesODTo> qryArticles(TbArticleCondition condition);

     /** 
   * @Function: com.teemor.blog.service.IArticleService.qryArticleById
   * @Description: 根据主键查询
   * @param: atcId
   * @return: TbArticle
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    QryArticleODTo qryArticleById(Integer atcId, Integer flag,  String ip);

     /** 
   * @Function: com.teemor.blog.service.IArticleService.addArticle
   * @Description: 新增接口
   * @param: inParam
   * @return: int
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    int addArticle(AddArticleIDTo inParam);

     /** 
   * @Function: com.teemor.blog.service.IArticleService.updArticleById
   * @Description: 根据Id更新接口
   * @param: inParam
   * @return: int
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    int updArticleById(TbArticle inParam);

    /**
     * @Function: com.teemor.blog.service.IArticleService.delArticleById
     * @Description: 根据博客ID删除博客
     *
     * @param: atcId
     * @return: int
     *
     * @version: v1.0.0
     * @author: zhoulk
     * @date: 2019/12/26 22:33
     *
     * Modification History:
     * Date             Author      Version            Description
     *---------------------------------------------------------*
     * 2019/12/26 22:33    zhoulk      v1.0.0             修改原因
     *
     */
    int delArticleById(Integer atcId);

    /**
     * @Function: com.teemor.blog.service.IArticleService.searchArticles
     * @Description: 搜索文章列表，从es中查询
     *
     * @param: inParam
     * @param: scrollId
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     *
     * @version: v1.0.0
     * @author: zhoulk
     * @date: 2020/2/2 20:29
     *
     * Modification History:
     * Date             Author      Version            Description
     *---------------------------------------------------------*
     * 2020/2/2 20:29    zhoulk      v1.0.0             修改原因
     *
     */
    Map<String, Object> searchArticles(QryArticlesIDTo inParam, String scrollId);

    List<QryArchivesODTo> archive();

    /**
     * @Function: com.teemor.blog.service.IArticleService.updArticleState
     * @Description: 修改文章状态
     *
     * @param: atcId
     * @param: atcState
     * @return: java.util.Map<java.lang.String,java.lang.Object>
     *
     * @version: v1.0.0
     * @author: zhoulk
     * @date: 2020/2/2 20:29
     *
     * Modification History:
     * Date             Author      Version            Description
     *---------------------------------------------------------*
     * 2020/2/2 20:29    zhoulk      v1.0.0             修改原因
     *
     */
    Map<String, Object> updArticleState(Integer atcId, Integer atcState);

}